FROM node:18-alpine

WORKDIR /app

COPY package*.json ./

RUN npm install

COPY . .

# 确保上传目录存在
RUN mkdir -p uploads
RUN chmod 777 uploads

EXPOSE 9999

# Add this line to debug - it will show the directory contents
RUN ls -la

# Modify the CMD to use the correct entry file
# If your main file is not index.js, replace with the correct filename
CMD ["node", "index.js"]